<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <%@include file="/static/common/commonHead.jsp"%>
    <script type="text/javascript" src="/static/js/employee/employee.js"></script>
</head>
<body>
<%--工具栏--%>
<div id="tools">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">增加</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" id="btn_changeState" data-cmd="changeState">设置离职</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reloadList">刷新</a>
    <a class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="resetPassword">重置密码</a>
    <input class="easyui-textbox" id="keyword" prompt="请输入用户名或手机号码" name="keyword">
    <input class="easyui-combobox" name="deptId" id="deptId"
           data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'/department/selectAll.do'" />
    雇用日期:<input class="easyui-datebox" id="beginDate">~
    <input class="easyui-datebox" id="endDate">
    <a class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="searchs"></a>
    <a class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-print'"
       onclick="window.open('/employee/exportXls.do')">导出</a>
    <a class="easyui-linkbutton" data-cmd="getImportXlsMode" data-options="iconCls:'icon-redo',plain:true">获取上传模板</a>
    <form id="importXls_form" method="post" enctype="multipart/form-data">
        <input name="file" class="easyui-filebox" style="width: 170px" data-options="buttonText: '选择文件', buttonAlign:'left'"/>
        <a class="easyui-linkbutton" data-cmd="importXls" data-options="iconCls:'icon-undo',plain:true">上传文件</a>
    </form>
</div>

<%--表格--%>
<table id="emp_list"></table>

<%--重置密码--%>
<div id="resetPassword_dialog">
    <form id="password_form" method="post">
        <table align="center" style="margin-top: 20px">
            <input type="hidden" name="id"/>
            <tr>
                <td>用户名：</td>
                <td>
                    <input id="resetP_username" name="username" class="easyui-textbox" readonly>
                </td>
            </tr>
            <tr>
                <td>重置密码：</td>
                <td>
                    <input id="resetPassword" class="easyui-textbox" name="resetPassword" data-options="required:true">
                </td>
            </tr>
            <tr>
                <td>重复密码：</td>
                <td>
                    <input id="repassword" class="easyui-textbox" name="repassword" data-options="required:true">
                </td>
            </tr>
        </table>
    </form>
</div>

<%--编辑页面--%>
<div id="emp_dialog">
    <form id="emp_form" method="post">
        <table align="center" style="margin-top: 20px">
            <input type="hidden" name="id"/>
            <tr>
                <td>用户名</td>
                <td>
                    <input class="easyui-textbox" name="username" data-options="required:true">
                </td>
            </tr>
            <tr>
                <td>真实名称</td>
                <td>
                    <input class="easyui-textbox" name="realname" data-options="required:true">
                </td>
            </tr>
            <tr id="password">
                <td>密码</td>
                <td>
                    <input class="easyui-passwordbox" name="password" data-options="required:true" />
                </td>
            </tr>
            <tr>
                <td>电话号码</td>
                <td>
                    <input class="easyui-textbox" name="tel" data-options="required:true" >
                </td>
            </tr>
            <tr>
                <td>电子邮箱</td>
                <td>
                    <input class="easyui-textbox" name="email" >
                </td>
            </tr>
            <tr>
                <td>所属部门</td>
                <td>
                    <input id="depts" class="easyui-combobox" name="dept.id"
                           data-options="panelHeight:'auto',valueField:'id',textField:'name',url:'/department/selectAll.do'" />
                </td>
            </tr>
            <tr>
                <td>雇佣日期</td>
                <td>
                    <input class="easyui-datebox" name="hireDate">
                </td>
            </tr>
            <tr>
                <td>管理员</td>
                <td>
                    <input name="state" class="easyui-combobox"
                           data-options="
                        panelHeight:'auto',
                        valueField: 'state',
                        textField: 'value',
                        data: [{
                            state: '1',
                            value: '是'
                        },{
                            state: '0',
                            value: '否',
                            selected:true
                    }]">
                </td>
            </tr>
            <tr>
                <td>角色</td>
                <td>
                    <input id="roleId" class="easyui-combobox"
                           data-options="multiple:true,panelHeight:'auto',
                           valueField:'id',textField:'name',
                           url:'/role/selectAll.do'
                            " />
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>
